import abc
from common.variables import TimeFrameType
import pandas as pd


class FactorBase:
    preloads: int
    bfname: str
    fname_list: list[str] = []
    depend_fnames: list[str]  # depends some fnames

    @abc.abstractmethod
    def calculate(
        self, symbol: str, timeframe: TimeFrameType, start: int, end: int
    ) -> pd.DataFrame:
        pass

    @property
    def basename(self):
        return self.__class__.__name__
